<div class="course-list">
    <div class="row">
        {% for courseSet in courseSets %}
            <div class="col-lg-3 col-md-4 col-xs-6">
                <div class="course-item">
                  <div class="course-img">
                    <a {% if ref|default() %} href="{{ path('course_show', {id: courseSet.defaultCourseId,ref:ref}) }}" {% else %} href="{{ path('course_show', {id: courseSet.defaultCourseId}) }}" {% endif %} target="_blank">
                      {% if courseSet.discountId > 0 %}
                        {% if courseSet.discount == 0 %}
                          <!-- 限免 -->
                          <span class="tag-discount free"></span>
                        {% else %}
                          <!-- 折扣 -->
                          <span class="tag-discount"></span>
                        {% endif %}
                      {% endif %}
                      {% if courseSet.serializeMode == 'serialized' %}
                        <span class="tags"><span class="tag-serialing"></span></span>
                      {% elseif courseSet.serializeMode == 'finished' %}
                        <span class="tags"><span class="tag-finished"></span></span>
                      {% endif %}
                      {% if courseSet.type == 'live' %}
                        <span class="tags">
                          <span class="tag-live"></span>
                        </span>
                      {% endif %}
                      {{ lazy_img(filepath(course_set_cover(courseSet, 'large'), 'courseSet.png'), 'img-responsive', courseSet.title) }}
                    </a>
                  </div>
                  <div class="course-info">
                    <div class="title">
                      <a class="link-dark" {% if ref|default() %} href="{{ path('course_show', {id: courseSet.defaultCourseId,ref:ref}) }}" {% else %} href="{{ path('course_show', {id: courseSet.defaultCourseId}) }}" {% endif %}
                       target="_blank">
                        {{ courseSet.title }}
                      </a>
                    </div>
                    <div class="metas clearfix">
                      {% if setting('course.show_student_num_enabled', '1') == 1  %}
                        <span class="num"><i class="es-icon es-icon-people"></i>{{ courseSet.studentNum }}</span>
                      {% endif %}
                      <span class="comment"><i class="es-icon es-icon-textsms"></i>{{ courseSet.ratingNum }}</span>
                      {% set course = courseSet.course|default(null) %}
                        {% if course %}
                          {% include 'course/widgets/price.html.twig' with {shows:'price'} %}
                        {% endif %}
                    </div>
                  </div>
                </div>
            </div>
        {% endfor %}
    </div>
</div>